﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;
using FrbaBus.Login;
using System.Data.SqlClient;
using FrbaBus.AbmCiudades;
using FrbaBus.IngresoCliente;
using FrbaBus.ConsultaPuntos;
using System.Configuration;

namespace FrbaBus
{
    public partial class FormPrincipal : Form
    {
        public FormPrincipal()
        {
            InitializeComponent();

            this.ShowDialog();
        }

        private void loginToolStripMenuItem_Click(object sender, EventArgs e)
        {
            FormLogin form = new FormLogin();
            form.ShowDialog(this);
        }

        private void pasajeToolStripMenuItem_Click(object sender, EventArgs e)
        {

        }

        private void encomiendaToolStripMenuItem_Click(object sender, EventArgs e)
        {
   
        }

        private void consultaPuntosToolStripMenuItem_Click(object sender, EventArgs e)
        {
            string referer = "consulta";

            FormIngresoCliente form = new FormIngresoCliente(referer);
            form.ShowDialog(this);

        }

        private void FormPrincipal_Load(object sender, EventArgs e)
        {

            var value = ConfigurationSettings.AppSettings["fechaSistemaAsString"];
            var fechaSistemaConfigurada = DateTime.Parse(value);
            Fechas.fechaSistema = fechaSistemaConfigurada;
        }

        private void menuPrincipal_ItemClicked(object sender, ToolStripItemClickedEventArgs e)
        {

        }

        private void btnCompra_Click(object sender, EventArgs e) {
            
            string referer = "compra";

            FormIngresoCliente form = new FormIngresoCliente(referer);
            form.ShowDialog(this);
       
        }
    }
}
